class Animal(object):
    # 创建父类
    def __init__(self,name,age):
        self.name = name
        self.age = age
    # 自定义动物的属性
    def eat(self):
        print(f'{self.name}吃东西')
    def sleep(self):
        print(f'{self.name}爱睡觉')
        # 调用吃和睡得方法
class Cat(Animal):
    def catch(self):
        print(f'{self.name}抓老鼠')
class Dog(Animal):
    def see(self):
        print(f'{self.name}能看门')
class Xtq(Dog):
    def fly(self):
        super().see()
        print(f'{self.name}能飞')
# 创建对象
dog = Xtq('皮皮',3)
dog.see()




